---
layout: default
title: Home
---

<div class="posts">
  {% for post in paginator.posts %}
  <div class="post">
    <h1 class="post-title">
      <a href="{{ site.url }}/{{ post.url }}"> {{ post.title }} </a>
    </h1>
    <div class="post-meta">
        <span class="post-date">{{ post.date | date_to_string }}</span>
        {% if post.tags.size > 0 %}
            | Tags: 
            {% for tag in post.tags %}
                <a class="post-tag" href='{{ site.url }}/tags/#{{tag | slugify }}'>{{tag}}</a>    
            {% endfor %}
        {% endif %}

        <div class="post-excerpt"> 
            {{ post.excerpt |strip_html| truncate: 300}}
        </div>
    </div>
  </div>
  {% endfor %}
</div>

<div class="pagination">
  {% if paginator.next_page %}
    <a class="pagination-item older" href="{{ site.baseurl }}/page{{paginator.next_page}}">Older</a>
  {% else %}
    <span class="pagination-item older">Older</span>
  {% endif %}
  {% if paginator.previous_page %}
    {% if paginator.page == 2 %}
      <a class="pagination-item newer" href="{{ site.baseurl }}/">Newer</a>
    {% else %}
      <a class="pagination-item newer" href="{{ site.baseurl }}/page{{paginator.previous_page}}">Newer</a>
    {% endif %}
  {% else %}
    <span class="pagination-item newer">Newer</span>
  {% endif %}


</div>

